<link href="/assets/home/css/myycenter.css" rel="stylesheet" />
<!-- 头部 -->
<div class="top_div" style="background-image: url('/assets/home/images/bac.jpg');">
    <!-- <img src="/assets/home/images/bac.jpg" class="top_img"> -->
    <div class="userInfo">
        <a href="{:url('/home/business/profile')}">
            {if !empty($data['avatar'])}
            <img class="uPic" src="{$data['avatar']}" />
            {else /}
            <img class="uPic" src="/assets/home/images/avatar.jpg" />
            {/if}
        </a>
        <p class="uBalance">{$data['nickname']}</p>
    </div>
</div>

<!-- 菜单 -->
<div class="weui-panel" style="margin-top: 0;">
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="{:url('/home/business/profile')}">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/information.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>基本资料</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    {if $login.auth==0}
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="{:url('/home/business/email')}">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/information.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>邮箱认证</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    {/if}
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="{:url('/home/subject/order',['busid' => $data['id']])}">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/order.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>我的订单</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="{:url('/home/subject/record',['busid' => $data['id']])}">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/order.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>我的消费</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="{:url('home/pay/index')}">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/recharge.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>充值</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="/home/business/contact">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/lianxi.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>联系我们</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a id="logout" href="javascript:void(0)" class="weui-cell weui-cell_access">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/logout.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>退出登录</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
</div>

<!-- 底部 -->
{include file="common/footer" /}

<script src="/assets/home/js/jquery-1.9.1.min.js"></script>
<script src="/assets/home/js/mui.min.js"></script>
<script src="/assets/home/js/mui.indexedlist.js"></script>
<script>
    $("#logout").click(function () {
        mui.confirm(
            '是否确认退出',
            '退出提醒',
            ['确认', '取消'],
            function (res) {
                if (res.index === 0) {
                    // 关闭当前窗口
                    $('.mui-popup-backdrop').remove()
                    $('.mui-popup').remove()
                    location.href = `{:url('home/index/logout')}`
                }
            }
        )
    })

    // 底部导航点击效果切换
    var tab=document.getElementsByClassName('tab-item');
    for(var i=0;i<tab.length;i++)
    {
        $(tab[i]).removeClass('mui-active');
    }
    $(tab[2]).addClass('mui-active')

</script>